<template>
  <div class="user">
    <NavList/>
    <div class="main">
      <div class="left">
        <div class="left-nav">
          <div>
            <router-link :to="{path:'/user/index'}">用户列表</router-link>
          </div>
          <div>
            <router-link :to="{path:'/user/create'}">添加用户</router-link>
          </div>
        </div>
      </div>
      <div class="right">
        <router-view></router-view>
      </div>
    </div>

  </div>
</template>

<script>
  import NavList from '@/components/NavList'

  export default {
    name: "Index",
    components: {
      NavList
    }
  }
</script>

<style scoped>
  .main{
    display: flex;
    flex-direction: row;
  }
  .left-nav {
    display: flex;
    flex-direction: column;
    margin: 20px 0;
  }

  .left-nav div {
    display: flex;
    background-color: #f1f1f1;
    width: 200px;
    height: 50px;
    line-height: 50px;
    justify-content: center;
    margin: 2px;
  }

  .left, .right {
    display: flex;
  }

  .right {
    padding: 20px;
  }
</style>
